//
//  QViewUtility.h
//  QoilPublic
//
//  Created by 杨凯 on 16/7/1.
//  Copyright © 2016年 杨凯. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "QPlayBoxView.h"
#import "QShowPayView.h"
#import "QShowSignBoxView.h"
#import "QPushModel.h"
typedef NS_ENUM(NSInteger, SepLinePosition) {
    SepLinePositionLeft,
    SepLinePositionRight,
    SepLinePositionBottom,
    SepLinePositionMiddle,
    SepLinePositionTop
};

@interface QViewUtility : NSObject

//选择新特性
+ (void)chooseRootViewController:(UIWindow *)window;

//显示loading
+ (void)showMBHudToView:(UIView*)view hideBg:(BOOL)hide;

+ (void)showCustomLoadingToView:(UIView*)view hideBg:(BOOL)hide custTitle:(NSString *)custTitle loadType:(int)type;

//隐藏loading
+ (void)hideMBHudToView:(UIView*)view;

+ (void)hideCustMBHudToView:(UIView*)view;

//显示数据请求后的message
+ (void)showToastToView:(UIView *)view message:(NSString *)message;
//
//+ (void)showSuccessToastToView:(UIView *)view message:(NSString *)meesage;
//
//+ (void)showFailToastToView:(UIView *)view message:(NSString *)meesage;

//miss掉
+ (void)dismissNoDataViewInVC:(UIViewController*)vc;

//没有数据（哭泣）
+ (void)showNoRecordViewInView:(UIView *)superView Title:(NSString *)title;
//移除掉
+ (void)disMissNoRecordInVC:(UIViewController *)vc;

//没有数据
+ (void)showNoDataViewInView:(UIView*)superView string:(NSString *)string;

//没有网络
+ (void)showNoNetWorkInView:(UIView *)superView;

//dismiss掉之前的
+ (void)disMissNoNetWorkInVC:(UIViewController *)vc;

//上拉刷新
+ (MJRefreshNormalHeader *)showHeadRefresh:(void(^)())refreshBlock;

//下拉加载
+ (MJRefreshBackNormalFooter *)showFootRefresh:(void(^)())refreshBlock;

//显示弹框
+ (void)showPlayBoxView:(PlayboxViewStyle)style myBlock:(void(^)(NSInteger index))block;

//多个订单支付弹框
+ (void)showMorePlayPayViewAmount:(NSString *)amount data:(NSArray *)arr myBlock:(void(^)(NSInteger index))block;

//设置导航栏返回按钮
+ (void)setupNavigationBarBackForController:(UIViewController*)controller backSelector:(SEL)backSelector;

//画线
+ (void)drawSepLineforView:(UIView*)view position:(SepLinePosition)position color:(UIColor*)bgColor;

//日期控件
+ (void)showDatePickView:(void(^)(NSString *str))block;

//最新弹框
+ (void)showAlertViewWithImage:(UIImage *)image
                       content:(NSString *)content
                      btnTitle:(NSString *)btnTitle
                          type:(NSInteger)type
                       myBlock:(void(^)())block;

//给指定人打电话弹框
+ (void)showPhonePlayBoxViewWithName:(NSString *)name Number:(NSString *)number myBlock:(void(^)(NSInteger))block;

//最新弹框
+ (void)showAlertChooseViewWithImage:(UIImage *)image
                       content:(NSString *)content
                      leftTitle:(NSString *)leftTitle
                          rightTitle:(NSString *)rightTitle
                          type:(NSInteger)type
                       myBlock:(void(^)(NSInteger tag))block;

//加油提示
+ (void)showAlertWebViewWithUrl:(NSString *)url;

//创建label
+ (UILabel *)createLabelWithFrame:(CGRect)frame
                             font:(NSInteger)font
                    textAlignment:(NSTextAlignment)textAlignment
                        textColor:(UIColor *)textColor
                             text:(NSString *)text;

//创建button
+ (UIButton *)createButtonWithFrame:(CGRect)frame
                               font:(NSInteger)font
                              title:(NSString *)title
                         titleColor:(UIColor *)titleColor
                    backgroundColor:(UIColor *)backgroundColor;

+ (void)callPhone;

+ (void)callPhoneWithNumber:(NSString *)number;

//签到弹框
+ (void)showSignBoxViewWithTitle:(NSString *)title;

//推送弹窗
+ (void)showPushBoxViewWithModel:(QPushModel *)model myBlock:(void(^)(NSInteger))block;
//获取当前控制器
+ (UIViewController *)getCurrentVC;

#pragma mark --- 余额显示的动画----
+ (void)setNumberTextOfLabel:(UILabel *)label WithAnimationForValueContent:(CGFloat)value;

@end
